package controller.thread_pool_solver;

public class Result implements Comparable<Result>{
	private int[] x;
	private int[] y;
	private int[] z;
	
	private double leaderIncome;
	private double rivalIncome;
	
	public Result(int[] x, int[] y, int[] z, double leaderIncome, double rivalIncome) {
		this.x = x;
		this.y = y;
		this.z = z;
		this.leaderIncome = leaderIncome;
		this.rivalIncome = rivalIncome;
	}
	
	public int[] getX() {
		return x;
	}
	
	public void setX(int[] x) {
		this.x = x;
	}

	public int[] getY() {
		return y;
	}

	public void setY(int[] y) {
		this.y = y;
	}

	public int[] getZ() {
		return z;
	}

	public void setZ(int[] z) {
		this.z = z;
	}

	public double getLeaderIncome() {
		return leaderIncome;
	}
	
	public void setLeaderIncome(double leaderIncome) {
		this.leaderIncome = leaderIncome;
	}

	public double getRivalIncome() {
		return rivalIncome;
	}

	public void setRivalIncome(double rivalIncome) {
		this.rivalIncome = rivalIncome;
	}

	@Override
	public int compareTo(Result o) {
		if(this.leaderIncome > o.leaderIncome) return -1;
		if(this.leaderIncome == o.leaderIncome) return 0;
		return 1;
	}
	
	@Override
	public String toString() {
		return Double.toString(leaderIncome);
	}
}
